import server from "./request.js";
// 登录
export const login = (data) => {
  return server({
    url: "/login",
    method: "post",
    data,
  })
}
// 获取菜单
export const getMenu = (params) => {
  return server({
    url: "/menus",
    method: "get",
    params
  })
}
// 获取用户列表
export const getUserList = (params) => {
  return server({
    url: "/users",
    method: "get",
    params,
  })
}
// 添加用户
export const addUsers = (data) => {
  return server({
    url: '/users',
    method: "post",
    data,
  })
}
/*
import {login} from '@/api/api'  //引入页面
 
//调用接口
login(){
    let data = {
        userName:"admin",
        passWord:123456
    } 
    login(data).then(res =>{})
}

-------------------------------
import {login} from '@/api/api'  //引入页面
 
//调用接口
async login(){
    let data = {
        userName:"admin",
        passWord:123456
    } 
    let res = await login(data)
}
*/